#include "../../../Public/Window/PTWindow.h"
#include "../../../Public/System/PTExecutionSystem.h"

class PTWindowImpl :public IPTWindow
{
	PTSpinLock m_HandleSpinLock;
	uint32_t volatile m_bHandleChanged;
	ANativeWindow * volatile m_HandleWindow;
	PTSpinLock m_SizeSpinLock;
	uint32_t volatile m_bSizeChanged;
	uint32_t volatile m_Width;
	uint32_t volatile m_Height;

	void HandleGet(uint32_t *pChanged, PTHandleDisplay *pHandleDisplay, PTHandleWindow *pHandleWindow) override;
	void SizeGet(uint32_t *pChanged,uint32_t *pWidth, uint32_t *pHeight, uint32_t *pLayer) override;

public:
	void HandleSet(ANativeWindow *HandleWindow);
	void SizeSet(uint32_t width, uint32_t Height);

	void Construct();
	void Destruct();
};